﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FriendLinksMod.aspx.cs" Inherits="admin_FriendLinksMod" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>修改友情链接</title>
    <link href="css/main.css" rel="stylesheet" type="text/css">
    <script language="javascript" type="text/javascript">
        function btnAdd()
        {
            window.location = "FriendLinks.aspx";
        }
        //检查字段输入是否合法
        function checkRule()
        {
            var account = document.getElementById('<%=this.txtTitle.ClientID %>');
            var password = document.getElementById('<%=this.txtENTitle.ClientID %>');
            var username = document.getElementById('<%=this.txtUrl.ClientID %>');
            var phone = document.getElementById('<%=this.txtSort.ClientID %>');
            if (account.value == "")
            {
                alert("请输入网站中文标题!");
                account.focus();
                return false;
            }
            if (password.value == "")
            {
                alert("请输入网站英文标题!");
                password.focus();
                return false;
            }
            if (username.value == "")
            {
                alert("请输入网站链接地址!");
                username.focus();
                return false;
            }
            if (phone.value == "")
            {
                alert("请输入排序值!");
                phone.focus();
                return false;
            }
            return true;

        }


        function check_validate1(value)
        {
            var k = event.keyCode;
            //48-57是大键盘的数字键，96-105是小键盘的数字键，8是退格符←  
            if ((k <= 57 && k >= 48) || (k <= 105 && k >= 96) || (k == 8))
            {
                return true;
            } else
            {
                return false;
            }  
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="breadcrumbs">
    <a id="aBack" href="FriendLinks.aspx">
        返回</a> <span>修改友情链接</span> </div>
    <%--<h1 class="pageTitle">
        新增用户</h1>--%>
    <div class="form_default" >
        <fieldset>
            <legend></legend>
            <br />
            <p>
            <asp:TextBox ID="txtId" CssClass="sf"  style="display:none;" runat="server"></asp:TextBox> 
                <label for="name">
                    网站中文标题</label>
                <asp:TextBox ID="txtTitle" CssClass="sf" runat="server"></asp:TextBox> 
                <font style="color:Red; font-size:larger; ">* (必填) </font>
            </p>
            <p>
                <label for="email">
                    网站英文标题</label>
                <asp:TextBox ID="txtENTitle"  CssClass="sf" runat="server" ></asp:TextBox>
                <font style="color:Red; font-size:larger; ">* (必填) </font>  
            </p>
            <p>
                <label for="location">
                    网站链接地址</label>
                <asp:TextBox ID="txtUrl" CssClass="sf" runat="server"></asp:TextBox>
                <font style="color:Red; font-size:larger; ">* (必填) </font>
            </p>
            <p>
                <label class="nopadding" for="gender">
                    排序值</label>
                <asp:TextBox ID="txtSort" onkeydown="return check_validate1();" CssClass="sf" runat="server"></asp:TextBox>
                <font style="color:Red; font-size:larger; ">* (必填) </font>
            </p>
            <br />
            <p style=" width:100%;">
                <asp:Button ID="btnAdd"  style=" margin-left:180px;"  runat="server" Text="保  存" CssClass="sear_sub" 
                    onclick="btnAdd_Click" OnClientClick="return checkRule();" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               <input type="button" onclick="document.getElementById('aBack').click();" value="返  回" class="sear_sub" />
                
            </p>
            <br />
        </fieldset>
    </div>
  
    </form>
</body>
</html>
